// 定义一个接口
interface InterfacePerson {
    name: string,
    age: number,

    saiHai(): void
}

// person类实现了InterfacePerson这个接口
class Person implements InterfacePerson {
    name: string
    age: number

    constructor(name: string, age: number) {
        this.name = name
        this.age = age
    }

    saiHai(): void {
        console.log("您好")
    }
}

const person: Person = new Person("陶品奇", 22)
console.log(person.name, person.age)
person.saiHai()